{extend name="admin@index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">充值记录</div>
    <div class="layui-card-body">
        <table class="layui-hide" id="currentTable" lay-filter="currentTable"></table>
    </div>
</div>
<script type="text/html" id="barTool">
    {{# if(d.status==0){ }}
    <a class="layui-btn layui-btn-xs" data-open='{:url("edit")}?id={{ d.id }}' data-title="审核">审核</a>
    {{# } }}

    {{# if(d.status==1&&d.is_kuan==0){ }}
    <a href="javascript:;" onclick="wk.confirm('{{d.id}}','{:url('ckuan')}','确认转账吗？')" class="layui-btn layui-btn-xs layui-btn-normal" title="确认转账">确认转账</a>
    {{# } }}


    {{# if(d.status==1){ }}
    <a class="layui-btn layui-btn-xs layui-btn-warm" data-open='{:url("detail")}?id={{ d.id }}'
       data-title="查看详情">查看详情</a>
    {{# } }}
</script>
{/block}
{block name="script"}
<script>
    layui.use(['yznTable', 'table'], function () {
        var table = layui.yznTable;
        var init = {
            table_elem: '#currentTable',
            table_render_id: 'currentTable',
            add_url: "{:url('add')}",
            edit_url: "{:url('edit')}",
            delete_url: "{:url('del')}",
        };
        table.render({
            elem: '#currentTable',
            autoWidth: true,
            search:false,
            toolbar: ['refresh',],
            url: '{:url("chargelist2")}?member_id={$member_id}',
            init: init,
            cols: [
                [
                    // {type: 'checkbox', fixed: 'left'},
                    {field: 'id', align: 'center',width: '20%', title: 'ID'},

                    {field: 'num', align: 'center', width: '20%', title: '充值金额', search: false},

                    {field: 'create_time', align: 'center', width: '60%', title: '时间', search: 'range'},

                ]
            ],
            page: {}
        });
        table.bindevent();
        selectElement2 = document.getElementById('searchFieldset_currentTable');
        selectElement2.classList.remove("layui-hide");
        var element = document.getElementById('layui-input-search');
        element.parentNode.removeChild(element);
    });
</script>
{/block}